import Vue from 'vue'

import Cookies from 'js-cookie'

import Element from 'element-ui'
import './assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import '@/assets/styles/langrui_custom.scss' // langrui_custom css
import App from './App'
import store from './store'
import router from './router'

import './assets/icons' // icon
import './permission' // permission control

//过滤器
import '@/utils/filter' // base filter
//全局作用域
import '@/utils/prototype' // base filter
//自定义组件
import '@/utils/componentCustom' // base filter

import '@/utils/lrkjUtils'

import Avue from '@smallwei/avue'
import '@smallwei/avue/lib/index.css'
// 数据字典
import dict from './components/custom/Dict'
import {ossAli} from '@/config/env'
//指令
import directive from './directive' //directive

// 头部标签组件
import VueMeta from 'vue-meta'
import Print from 'vue-print-nb'


import KrPrintDesigner from "kr-print-designer";
import "kr-print-designer/lib/kr-print-designer.css";

Vue.use(KrPrintDesigner);

Vue.use(Print); //注册
Vue.use(directive)
Vue.use(VueMeta)
Vue.use(dict)

//有些props 属性设置default不生效,需要这样:
Element.Select.props.filterable =  {
  type: Boolean,
  default: true
}

Element.Dialog.props.closeOnClickModal =  {
  type: Boolean,
  default: false
}

Vue.use(Element, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
})

Vue.use(Avue, {
  ali: ossAli
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
